﻿lastScrollY = 0;
function heartBeat() {
    var diffY;
    if (document.documentElement && document.documentElement.scrollTop)
        diffY = document.documentElement.scrollTop;
    else if (document.body)
        diffY = document.body.scrollTop
    else
    { /*Netscape stuff*/ }

    //alert(diffY);
    percent = .1 * (diffY - lastScrollY);
    if (percent > 0) percent = Math.ceil(percent);
    else percent = Math.floor(percent);

    document.getElementById("kefu14").style.top = parseInt(document.getElementById

("kefu14").style.top) + percent + "px";

    lastScrollY = lastScrollY + percent;
    //alert(lastScrollY);
}


var str = "<div id=\"kefu14\" style='left:10px;position:absolute;top:100px;'>";
str += "<div><img src='http://i.ymcps.com/images/float/images/top.jpg' /></div>";
str += "<ul style='background-image: url(http://i.ymcps.com/images/float/images/bg.jpg);background-repeat: repeat-y;width:115px;height:75px;margin:0;padding:0;list-style:none;font-size:12px;text-align:center'>";
str += "<br/>";
str += "<li style=\"height:25px;line-height:25px;\"><input type=\"button\" value=\"订购咨询\" style=\"background-image: url(http://i.ymcps.com/images/float/images/zxone.jpg);background-repeat: no-repeat;width:98px;height:25px;line-height:25px;border:0;padding-left:25px;\" onclick=\"window.open('http://chat8.live800.com/live800/chatClient/chatbox.jsp?jid=2481090829&companyID=65833&configID=64138&skillId=2872&enterurl=http%3A%2F%2Fpay%2Eemoney%2Ecn%2Fproduct%2Easpx&tm=1302605843868')\"/></a></li>";
str += "<li style=\"height:25px;line-height:25px;\"><input type=\"button\" value=\"操作咨询\" style=\"background-image: url(http://i.ymcps.com/images/float/images/zxtwo.jpg);background-repeat: no-repeat;width:98px;height:25px;line-height:25px;border:0;padding-left:25px;\" onclick=\"window.open('http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=65833&jid=2481090829&skillId=6533&enterurl=http%3A%2F%2Fchat8%2Elive800%2Ecom%3A8080%2Flive800%2Fpreview%2Ejsp&tm=1304425279221')\"/></a></li>";
str += "</ul>";
str += "<div><img src='http://i.ymcps.com/images/float/images/bottom.jpg' /></div>";
str += "</div>";

suspendcode14 = str;
document.write(suspendcode14);
window.setInterval("heartBeat()", 1);